home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / language / j51.zoo / emacs.bindings next >
Internet Message Format  |  1992-09-12  |  4KB

  1. From pjf@osiris.cs.uoguelph.ca Sat Mar  7 10:42 EST 1992
  2. From: pjf@osiris.cs.uoguelph.ca (Peter Jaspers-Fayer)
  3. Message-Id: <9203071541.AA16593@osiris.cs.uoguelph.ca>
  4. Subject: J 4 on the ST ("emacs-like" keys)
  5. To: ljdickey@watmath (Prof Lee Dickey)
  6. Date: Sat, 7 Mar 92 10:41:54 EST
  7. Organization: Computing & Comm. Services, Univ. of Guelph, Ont. Can. N1G 2W1
  8.  
  9. Hi.  I had a look at the latest ST version of J, and (in case you were still
  10. using your ST), thought I'd forward a few things:
  11.  
  12. Discovering that ^Q allowed me to explore his key mappinmg a a bit.
  13.  
  14. Scott Kolodzieski's original README.ST file expanded by PJF Mar'92:
  15. ==============================================================================
  16. files :  1. j41-st.tos        The executable
  17.      2. input.rc        A key file that specifies the default key 
  18.                   bindings for the readline interface. 
  19. ==============================================================================
  20. Notes :  The major advantage of this ST port of J is the fact that I built a 
  21.      gnu-readline interface into the j input parser. Now j41-st.tos keeps 
  22.      a history of previous commands that may be recalled and changed. Also
  23.        while typing in any command, the current line may be edited and 
  24.      changed anytime before a <return> is pressed. The key bindings are 
  25.      by default, 
  26.  
  27.              ^A : beginning of line 
  28.            ^B : backward-character
  29.          ^D : delete character under cursor (cf <Delete> key)
  30.           ^E : end-of-line
  31.              ^F : forward-character
  32.          ^H : as <Backspace> key
  33.          ^K : kill-to-end-of-line
  34.          ^J : execute (like ^M & enter)
  35.          ^N : next-command
  36.          ^L : redraw screen with current line at top
  37.          ^M : execute (like ^J & enter)
  38.          ^P : previous-command 
  39.          ^Q or ^V quote next character, eg. ^Q^H enters a BS character
  40.          ^R : reverse search for string in this line (end with <esc>)
  41.          ^S : forward search for string in this line
  42.          ^U : kill-to-beginning-of-line
  43.          ^Y : yank-back-previously-killed-buffer
  44.          ^Delete : undelete chars deleted on this line.
  45.  
  46.     A more pleasing arrangment would be to have the 4 arrow keys 
  47.     bound to (^F,^B,^P,^N) in the obvious order. This may be done 
  48.     by setting the environment variable INPUTRC to point to the 
  49.     included file "input.rc". An exmaple of this (from my system
  50.     on which I run bash) would be :
  51.  
  52.             set INPUTRC="c:\lib\readline\input.rc"
  53.                                             ^
  54.                                         |
  55.                                     +-- replace by correct path.
  56.             j41-st.tos
  57.  
  58.     Should put you into j41-st with a nice key binding set up. 
  59.  
  60.                             cheers,
  61.                             scott kolodzieski
  62. ============================================================================== 
  63. This allowed me to set the <Undo> and <Help> keys, and so show how one could
  64. also set the F1-F10 keys.  I guess you could also remap just about any control
  65. or escape sequence.   Here is my (added to) INPUT.RC file:
  66.  
  67. ============================================================================== 
  68. # bind <up-arrow>
  69. "\e*H": previous-history
  70. # bind <down-arrow>
  71. "\e*P": next-history
  72. # bind <left-arrow>
  73. "\e*K": backward-char
  74. # bind <right-arrow>
  75. "\e*M": forward-char
  76. # bind <delete> and <back-space>
  77. "":   backward-delete-char
  78. "✓":   backward-delete-char
  79. #
  80. # Using the ^Q key from within J, I was able to determine the sequences below:
  81. #
  82. # Help key edits a file
  83. "\e*b" "0!:0 'more EXT_CONJ.JS' NB. Edit a list of conjunctions"
  84. # Undo key sets up for )off (Needs a <cr>, unlike unix, can't store one here.)
  85. "\e*a" "0!:55 ')off'"
  86. #  F1   F2   F3   F4   F5   F6   F7   F8   F9   F10   send 
  87. # \e*; \e*< \e*= \e*> \e*? \e*@ \e*A \e*B \e*C \e*D
  88. "\e*;" "4!:0 3"
  89. "\e*<" "0!:0 'vi "
  90. "\e*>" "2!:4 <'"
  91. -- 
  92.  /PJ                                            pjf@osiris.cs.uoguelph.ca
  93.                                                        pjf@vm.uoguelph.ca
  94.                                                        (519)824-4120x6309
  95.  
  96.